//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================

#include <ddk.h>

//
// Device Drivers
//
#define DEVICENAME_P6032                L"p6032"
#define DEVICENAME_FW82371              L"FW82371"
#define DEVICENAME_KEYBOARD             L"keyboard"
#define DEVICENAME_CONSOLE              L"console"
#define DEVICENAME_MOUSE                L"mouse"

// Boot file list driver
#define DEVICENAME_BOOTMODS             L"bootmods"

EXTERN IDeviceDriver * CDECL InitP6032IRQ(uint_t uDeviceNo, void *pvParameter);

EXTERN IDeviceDriver * CDECL InitFW82371IRQ(uint_t uDeviceNo, void *pvParameter);

EXTERN IDeviceDriver * CDECL CreatePS2Keyboard(uint_t uDeviceNo, void *pvParameter);

EXTERN IDeviceDriver * CDECL CreateConsole(uint_t uDeviceNo, void *pvParameter);

EXTERN IDeviceDriver * CDECL CreateMouse(uint_t uDeviceNo, void *pvParameter);

EXTERN IDeviceDriver * CDECL CreateBootModules(uint_t uDeviceNo, void *pv);

//
// Device Configurations
//
// NOTE: the device name can't be more than 31 words
STATIC DECL_DATAINIT DeviceConfig s_deviceConfigs[] = {
    { DEVICENAME_P6032, DEVICENO_NONE, NULL },
    { DEVICENAME_FW82371, DEVICENO_NONE, NULL },
    { DEVICENAME_KEYBOARD,          0, NULL},
    { DEVICENAME_CONSOLE,           0, NULL},
    { DEVICENAME_MOUSE, DEVICENO_NONE, NULL },
    { DEVICENAME_BOOTMODS,          0, NULL },
};

//
// Driver Configurations
//
STATIC DriverConfig s_driverConfigs[] = {
    { DEVICENAME_P6032, &InitP6032IRQ },
    { DEVICENAME_FW82371, &InitFW82371IRQ },
    { DEVICENAME_KEYBOARD,           &CreatePS2Keyboard },
    { DEVICENAME_CONSOLE, &CreateConsole },
    { DEVICENAME_MOUSE, &CreateMouse },
    { DEVICENAME_BOOTMODS, &CreateBootModules },
};

DzConfig dzcfg = {
    s_deviceConfigs,                // *pDeviceConfigs
    lengthof(s_deviceConfigs),      // uNumberOfDeviceConfigs

    s_driverConfigs,                // *pDriverConfigs
    lengthof(s_driverConfigs)       // uNumberOfDriverConfigs
};
